/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.contract.bo;

import com.pig4cloud.pigx.contract.entity.ContractOrder;
import com.pig4cloud.pigx.contract.entity.ContractPosition;
import com.pig4cloud.pigx.contract.entity.ContractPositionMarginDetail;
import com.pig4cloud.pigx.contract.mongo.entity.ContractSymbolMongo;
import com.pig4cloud.pigx.contract.mongo.entity.ContractTradeMongo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 新增成交记录BO
 *
 * @date 2022-08-11 10:08:11
 */
@Data
public class ContractTradeNewBO extends ContractTradeMongo {
	/**
	 * 是否是开仓
	 */
	private Boolean isOpen;
	/**
	 * 是否是做多
	 */
	private Boolean isLong;
	/**
	 * 币对信息
	 */
	private ContractSymbolMongo symbol;
	/**
	 * 仓位信息
	 */
	private ContractPosition position;
	/**
	 * 订单信息
	 */
	private ContractOrder order;
	/**
	 * 修改后的对手盘订单信息
	 */
	private ContractTradeNewBO makerBo;
	/**
	 * 该交易解冻的额度
	 */
	private BigDecimal unfreezeAmount;
	/**
	 * 是否是新仓位
	 */
	private Boolean isNewPosition;
	/**
	 * 是否完全成交
	 */
	private Boolean isAllDeal = false;
	/**
	 * 是否完全平仓
	 */
	private Boolean isAllClose = false;
	/**
	 * 变更合约账户参数集合
	 */
	private List changeAmountParamList = new ArrayList<>();
	/**
	 * 仓位保证金明细
	 */
	private List<ContractPositionMarginDetail> marginDetailList = new ArrayList<>(2);
	/**
	 * 生成过止盈止损
	 */
	private Boolean hasAddStopOrder = false;
}
